﻿CREATE PROCEDURE [dbo].[proc_Customer_CallOnTongJi_CheckInOutViewCount]
	(
		@DepartmentId int,
		@ResultFlag int,
		@StartDate nvarchar(10),
		@EndDate nvarchar(10)
	)
AS
	Select Count(Id) From CheckInOut
	Where DepartmentId=@DepartmentId and ResultFlag=@ResultFlag and Convert(nchar(10),CheckOutTime,120)>=@StartDate and Convert(nchar(10),CheckOutTime,120)<=@EndDate
	RETURN
